package domain;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map.Entry;

import org.codehaus.jackson.JsonNode;

public class Map {

	
	public static class RoadBlock{
		
		public RoadBlock(Entry<String, JsonNode> entry) {
			this.from = Integer.parseInt(entry.getKey());
			
			Iterator<JsonNode> fromsIt = entry.getValue().getElements();
			
			to = new ArrayList<Integer>();
			
			while (fromsIt.hasNext()) {
				JsonNode jsonNode = (JsonNode) fromsIt.next();
				to.add(jsonNode.asInt());
			}
			
		}

		public int from;
		
		public List<Integer> to;

	}
	
	public int mapSize;
	
	
	public List<RoadBlock> roadBlocks;
	
	
	
	public boolean isAvaible(int from, int to){
		
		for (RoadBlock temp : roadBlocks){
			
			if (temp.from==from){
				//for (Integer tempint : to)
			}
		}

		
		return false;
	}
	
	
}
